import {createRouter, createWebHashHistory} from "vue-router";
import Home from "../components/Home.vue";
import HomeDashboard from "../components/HomeDashboard.vue";
import Login from "../components/Login.vue";
import QueriedConsole from "../components/queried/QueriedConsole.vue";
import ConnectionsHome from "../components/connections/ConnectionsHome.vue";
import QueryEditor from "../components/queried/editor/QueryEditor.vue";


const routes = [
    {
        path: '/', component: Home,
        children: [
            {path: '', component: HomeDashboard},
            {path: 'dashboard', component: HomeDashboard},
            {path: 'queried', component: QueriedConsole},
            {path: 'connections', component: ConnectionsHome},
            {path: 'editor', component: QueryEditor},
        ]
    },
    {path: '/login',component: Login }
]


const router = createRouter({
    history: createWebHashHistory(),
    routes
});

export default router
